\(\int \frac {(d+e x)^2}{(a+b x+c x^2)^3} \, dx\) [2204]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [F(-2)]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 198 \[ \int \frac {(d+e x)^2}{\left (a+b x+c x^2\right )^3} \, dx=-\frac {(d+e x) (b d-2 a e+(2 c d-b e) x)}{2 \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^2}-\frac {2 b^2 d e+4 a c d e-3 b \left (c d^2+a e^2\right )-\left (6 c^2 d^2+b^2 e^2-2 c e (3 b d-a e)\right ) x}{\left (b^2-4 a c\right )^2 \left (a+b x+c x^2\right )}-\frac {2 \left (6 c^2 d^2+b^2 e^2-2 c e (3 b d-a e)\right ) \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{\left (b^2-4 a c\right )^{5/2}} \]

[Out]

-1/2*(e*x+d)*(b*d-2*a*e+(-b*e+2*c*d)*x)/(-4*a*c+b^2)/(c*x^2+b*x+a)^2+(-2*b^2*d*e-4*a*c*d*e+3*b*(a*e^2+c*d^2)+(
6*c^2*d^2+b^2*e^2-2*c*e*(-a*e+3*b*d))*x)/(-4*a*c+b^2)^2/(c*x^2+b*x+a)-2*(6*c^2*d^2+b^2*e^2-2*c*e*(-a*e+3*b*d))
*arctanh((2*c*x+b)/(-4*a*c+b^2)^(1/2))/(-4*a*c+b^2)^(5/2)

Rubi [A] (verified)

Time = 0.14 (sec) , antiderivative size = 198, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {752, 652, 632, 212} \[ \int \frac {(d+e x)^2}{\left (a+b x+c x^2\right )^3} \, dx=-\frac {2 \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right ) \left (-2 c e (3 b d-a e)+b^2 e^2+6 c^2 d^2\right )}{\left (b^2-4 a c\right )^{5/2}}-\frac {-x \left (-2 c e (3 b d-a e)+b^2 e^2+6 c^2 d^2\right )-3 b \left (a e^2+c d^2\right )+4 a c d e+2 b^2 d e}{\left (b^2-4 a c\right )^2 \left (a+b x+c x^2\right )}-\frac {(d+e x) (-2 a e+x (2 c d-b e)+b d)}{2 \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^2} \]

[In]

Int[(d + e*x)^2/(a + b*x + c*x^2)^3,x]

[Out]

-1/2*((d + e*x)*(b*d - 2*a*e + (2*c*d - b*e)*x))/((b^2 - 4*a*c)*(a + b*x + c*x^2)^2) - (2*b^2*d*e + 4*a*c*d*e
- 3*b*(c*d^2 + a*e^2) - (6*c^2*d^2 + b^2*e^2 - 2*c*e*(3*b*d - a*e))*x)/((b^2 - 4*a*c)^2*(a + b*x + c*x^2)) - (
2*(6*c^2*d^2 + b^2*e^2 - 2*c*e*(3*b*d - a*e))*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]])/(b^2 - 4*a*c)^(5/2)

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 632

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 652

Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((b*d - 2*a*e + (2*c*d -
b*e)*x)/((p + 1)*(b^2 - 4*a*c)))*(a + b*x + c*x^2)^(p + 1), x] - Dist[(2*p + 3)*((2*c*d - b*e)/((p + 1)*(b^2 -
 4*a*c))), Int[(a + b*x + c*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[2*c*d - b*e, 0] && NeQ[b^
2 - 4*a*c, 0] && LtQ[p, -1] && NeQ[p, -3/2]

Rule 752

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(d + e*x)^(m - 1)*(d
*b - 2*a*e + (2*c*d - b*e)*x)*((a + b*x + c*x^2)^(p + 1)/((p + 1)*(b^2 - 4*a*c))), x] + Dist[1/((p + 1)*(b^2 -
 4*a*c)), Int[(d + e*x)^(m - 2)*Simp[e*(2*a*e*(m - 1) + b*d*(2*p - m + 4)) - 2*c*d^2*(2*p + 3) + e*(b*e - 2*d*
c)*(m + 2*p + 2)*x, x]*(a + b*x + c*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] &
& NeQ[c*d^2 - b*d*e + a*e^2, 0] && NeQ[2*c*d - b*e, 0] && LtQ[p, -1] && GtQ[m, 1] && IntQuadraticQ[a, b, c, d,
 e, m, p, x]

Rubi steps \begin{align*} \text {integral}& = -\frac {(d+e x) (b d-2 a e+(2 c d-b e) x)}{2 \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^2}-\frac {\int \frac {2 \left (3 c d^2-e (2 b d-a e)\right )+2 e (2 c d-b e) x}{\left (a+b x+c x^2\right )^2} \, dx}{2 \left (b^2-4 a c\right )} \\ & = -\frac {(d+e x) (b d-2 a e+(2 c d-b e) x)}{2 \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^2}-\frac {2 b^2 d e+4 a c d e-3 b \left (c d^2+a e^2\right )-\left (6 c^2 d^2+b^2 e^2-2 c e (3 b d-a e)\right ) x}{\left (b^2-4 a c\right )^2 \left (a+b x+c x^2\right )}+\frac {\left (6 c^2 d^2+b^2 e^2-2 c e (3 b d-a e)\right ) \int \frac {1}{a+b x+c x^2} \, dx}{\left (b^2-4 a c\right )^2} \\ & = -\frac {(d+e x) (b d-2 a e+(2 c d-b e) x)}{2 \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^2}-\frac {2 b^2 d e+4 a c d e-3 b \left (c d^2+a e^2\right )-\left (6 c^2 d^2+b^2 e^2-2 c e (3 b d-a e)\right ) x}{\left (b^2-4 a c\right )^2 \left (a+b x+c x^2\right )}-\frac {\left (2 \left (6 c^2 d^2+b^2 e^2-2 c e (3 b d-a e)\right )\right ) \text {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{\left (b^2-4 a c\right )^2} \\ & = -\frac {(d+e x) (b d-2 a e+(2 c d-b e) x)}{2 \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^2}-\frac {2 b^2 d e+4 a c d e-3 b \left (c d^2+a e^2\right )-\left (6 c^2 d^2+b^2 e^2-2 c e (3 b d-a e)\right ) x}{\left (b^2-4 a c\right )^2 \left (a+b x+c x^2\right )}-\frac {2 \left (6 c^2 d^2+b^2 e^2-2 c e (3 b d-a e)\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{\left (b^2-4 a c\right )^{5/2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.17 (sec) , antiderivative size = 203, normalized size of antiderivative = 1.03 \[ \int \frac {(d+e x)^2}{\left (a+b x+c x^2\right )^3} \, dx=\frac {1}{2} \left (\frac {\left (6 c^2 d^2+b^2 e^2+2 c e (-3 b d+a e)\right ) (b+2 c x)}{c \left (b^2-4 a c\right )^2 (a+x (b+c x))}+\frac {a b e^2+2 c^2 d^2 x+b^2 e^2 x+b c d (d-2 e x)-2 a c e (2 d+e x)}{c \left (-b^2+4 a c\right ) (a+x (b+c x))^2}+\frac {4 \left (6 c^2 d^2+b^2 e^2+2 c e (-3 b d+a e)\right ) \arctan \left (\frac {b+2 c x}{\sqrt {-b^2+4 a c}}\right )}{\left (-b^2+4 a c\right )^{5/2}}\right ) \]

[In]

Integrate[(d + e*x)^2/(a + b*x + c*x^2)^3,x]

[Out]

(((6*c^2*d^2 + b^2*e^2 + 2*c*e*(-3*b*d + a*e))*(b + 2*c*x))/(c*(b^2 - 4*a*c)^2*(a + x*(b + c*x))) + (a*b*e^2 +
 2*c^2*d^2*x + b^2*e^2*x + b*c*d*(d - 2*e*x) - 2*a*c*e*(2*d + e*x))/(c*(-b^2 + 4*a*c)*(a + x*(b + c*x))^2) + (
4*(6*c^2*d^2 + b^2*e^2 + 2*c*e*(-3*b*d + a*e))*ArcTan[(b + 2*c*x)/Sqrt[-b^2 + 4*a*c]])/(-b^2 + 4*a*c)^(5/2))/2

Maple [A] (verified)

Time = 13.08 (sec) , antiderivative size = 351, normalized size of antiderivative = 1.77

method result size
default \(\frac {\frac {c \left (2 a c \,e^{2}+b^{2} e^{2}-6 b c d e +6 c^{2} d^{2}\right ) x^{3}}{16 a^{2} c^{2}-8 a \,b^{2} c +b^{4}}+\frac {3 b \left (2 a c \,e^{2}+b^{2} e^{2}-6 b c d e +6 c^{2} d^{2}\right ) x^{2}}{2 \left (16 a^{2} c^{2}-8 a \,b^{2} c +b^{4}\right )}-\frac {\left (2 a^{2} c \,e^{2}-5 a \,b^{2} e^{2}+10 a b c d e -10 a \,c^{2} d^{2}+2 b^{3} d e -2 b^{2} c \,d^{2}\right ) x}{16 a^{2} c^{2}-8 a \,b^{2} c +b^{4}}+\frac {6 e^{2} a^{2} b -16 a^{2} c d e -2 a d e \,b^{2}+10 a b c \,d^{2}-b^{3} d^{2}}{32 a^{2} c^{2}-16 a \,b^{2} c +2 b^{4}}}{\left (c \,x^{2}+b x +a \right )^{2}}+\frac {2 \left (2 a c \,e^{2}+b^{2} e^{2}-6 b c d e +6 c^{2} d^{2}\right ) \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\left (16 a^{2} c^{2}-8 a \,b^{2} c +b^{4}\right ) \sqrt {4 a c -b^{2}}}\) \(351\)
risch \(\frac {\frac {c \left (2 a c \,e^{2}+b^{2} e^{2}-6 b c d e +6 c^{2} d^{2}\right ) x^{3}}{16 a^{2} c^{2}-8 a \,b^{2} c +b^{4}}+\frac {3 b \left (2 a c \,e^{2}+b^{2} e^{2}-6 b c d e +6 c^{2} d^{2}\right ) x^{2}}{2 \left (16 a^{2} c^{2}-8 a \,b^{2} c +b^{4}\right )}-\frac {\left (2 a^{2} c \,e^{2}-5 a \,b^{2} e^{2}+10 a b c d e -10 a \,c^{2} d^{2}+2 b^{3} d e -2 b^{2} c \,d^{2}\right ) x}{16 a^{2} c^{2}-8 a \,b^{2} c +b^{4}}+\frac {6 e^{2} a^{2} b -16 a^{2} c d e -2 a d e \,b^{2}+10 a b c \,d^{2}-b^{3} d^{2}}{32 a^{2} c^{2}-16 a \,b^{2} c +2 b^{4}}}{\left (c \,x^{2}+b x +a \right )^{2}}-\frac {2 \ln \left (\left (32 a^{2} c^{3}-16 b^{2} c^{2} a +2 b^{4} c \right ) x +\left (-4 a c +b^{2}\right )^{\frac {5}{2}}+16 a^{2} b \,c^{2}-8 a \,b^{3} c +b^{5}\right ) a c \,e^{2}}{\left (-4 a c +b^{2}\right )^{\frac {5}{2}}}-\frac {\ln \left (\left (32 a^{2} c^{3}-16 b^{2} c^{2} a +2 b^{4} c \right ) x +\left (-4 a c +b^{2}\right )^{\frac {5}{2}}+16 a^{2} b \,c^{2}-8 a \,b^{3} c +b^{5}\right ) b^{2} e^{2}}{\left (-4 a c +b^{2}\right )^{\frac {5}{2}}}+\frac {6 \ln \left (\left (32 a^{2} c^{3}-16 b^{2} c^{2} a +2 b^{4} c \right ) x +\left (-4 a c +b^{2}\right )^{\frac {5}{2}}+16 a^{2} b \,c^{2}-8 a \,b^{3} c +b^{5}\right ) b c d e}{\left (-4 a c +b^{2}\right )^{\frac {5}{2}}}-\frac {6 \ln \left (\left (32 a^{2} c^{3}-16 b^{2} c^{2} a +2 b^{4} c \right ) x +\left (-4 a c +b^{2}\right )^{\frac {5}{2}}+16 a^{2} b \,c^{2}-8 a \,b^{3} c +b^{5}\right ) c^{2} d^{2}}{\left (-4 a c +b^{2}\right )^{\frac {5}{2}}}+\frac {2 \ln \left (\left (-32 a^{2} c^{3}+16 b^{2} c^{2} a -2 b^{4} c \right ) x +\left (-4 a c +b^{2}\right )^{\frac {5}{2}}-16 a^{2} b \,c^{2}+8 a \,b^{3} c -b^{5}\right ) a c \,e^{2}}{\left (-4 a c +b^{2}\right )^{\frac {5}{2}}}+\frac {\ln \left (\left (-32 a^{2} c^{3}+16 b^{2} c^{2} a -2 b^{4} c \right ) x +\left (-4 a c +b^{2}\right )^{\frac {5}{2}}-16 a^{2} b \,c^{2}+8 a \,b^{3} c -b^{5}\right ) b^{2} e^{2}}{\left (-4 a c +b^{2}\right )^{\frac {5}{2}}}-\frac {6 \ln \left (\left (-32 a^{2} c^{3}+16 b^{2} c^{2} a -2 b^{4} c \right ) x +\left (-4 a c +b^{2}\right )^{\frac {5}{2}}-16 a^{2} b \,c^{2}+8 a \,b^{3} c -b^{5}\right ) b c d e}{\left (-4 a c +b^{2}\right )^{\frac {5}{2}}}+\frac {6 \ln \left (\left (-32 a^{2} c^{3}+16 b^{2} c^{2} a -2 b^{4} c \right ) x +\left (-4 a c +b^{2}\right )^{\frac {5}{2}}-16 a^{2} b \,c^{2}+8 a \,b^{3} c -b^{5}\right ) c^{2} d^{2}}{\left (-4 a c +b^{2}\right )^{\frac {5}{2}}}\) \(868\)

[In]

int((e*x+d)^2/(c*x^2+b*x+a)^3,x,method=_RETURNVERBOSE)

[Out]

(c*(2*a*c*e^2+b^2*e^2-6*b*c*d*e+6*c^2*d^2)/(16*a^2*c^2-8*a*b^2*c+b^4)*x^3+3/2*b*(2*a*c*e^2+b^2*e^2-6*b*c*d*e+6
*c^2*d^2)/(16*a^2*c^2-8*a*b^2*c+b^4)*x^2-(2*a^2*c*e^2-5*a*b^2*e^2+10*a*b*c*d*e-10*a*c^2*d^2+2*b^3*d*e-2*b^2*c*
d^2)/(16*a^2*c^2-8*a*b^2*c+b^4)*x+1/2*(6*a^2*b*e^2-16*a^2*c*d*e-2*a*b^2*d*e+10*a*b*c*d^2-b^3*d^2)/(16*a^2*c^2-
8*a*b^2*c+b^4))/(c*x^2+b*x+a)^2+2*(2*a*c*e^2+b^2*e^2-6*b*c*d*e+6*c^2*d^2)/(16*a^2*c^2-8*a*b^2*c+b^4)/(4*a*c-b^
2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 767 vs. \(2 (192) = 384\).

Time = 0.31 (sec) , antiderivative size = 1555, normalized size of antiderivative = 7.85 \[ \int \frac {(d+e x)^2}{\left (a+b x+c x^2\right )^3} \, dx=\text {Too large to display} \]

[In]

integrate((e*x+d)^2/(c*x^2+b*x+a)^3,x, algorithm="fricas")

[Out]

[1/2*(2*(6*(b^2*c^3 - 4*a*c^4)*d^2 - 6*(b^3*c^2 - 4*a*b*c^3)*d*e + (b^4*c - 2*a*b^2*c^2 - 8*a^2*c^3)*e^2)*x^3
- (b^5 - 14*a*b^3*c + 40*a^2*b*c^2)*d^2 - 2*(a*b^4 + 4*a^2*b^2*c - 32*a^3*c^2)*d*e + 6*(a^2*b^3 - 4*a^3*b*c)*e
^2 + 3*(6*(b^3*c^2 - 4*a*b*c^3)*d^2 - 6*(b^4*c - 4*a*b^2*c^2)*d*e + (b^5 - 2*a*b^3*c - 8*a^2*b*c^2)*e^2)*x^2 +
 2*(6*a^2*c^2*d^2 - 6*a^2*b*c*d*e + (6*c^4*d^2 - 6*b*c^3*d*e + (b^2*c^2 + 2*a*c^3)*e^2)*x^4 + 2*(6*b*c^3*d^2 -
 6*b^2*c^2*d*e + (b^3*c + 2*a*b*c^2)*e^2)*x^3 + (a^2*b^2 + 2*a^3*c)*e^2 + (6*(b^2*c^2 + 2*a*c^3)*d^2 - 6*(b^3*
c + 2*a*b*c^2)*d*e + (b^4 + 4*a*b^2*c + 4*a^2*c^2)*e^2)*x^2 + 2*(6*a*b*c^2*d^2 - 6*a*b^2*c*d*e + (a*b^3 + 2*a^
2*b*c)*e^2)*x)*sqrt(b^2 - 4*a*c)*log((2*c^2*x^2 + 2*b*c*x + b^2 - 2*a*c - sqrt(b^2 - 4*a*c)*(2*c*x + b))/(c*x^
2 + b*x + a)) + 2*(2*(b^4*c + a*b^2*c^2 - 20*a^2*c^3)*d^2 - 2*(b^5 + a*b^3*c - 20*a^2*b*c^2)*d*e + (5*a*b^4 -
22*a^2*b^2*c + 8*a^3*c^2)*e^2)*x)/(a^2*b^6 - 12*a^3*b^4*c + 48*a^4*b^2*c^2 - 64*a^5*c^3 + (b^6*c^2 - 12*a*b^4*
c^3 + 48*a^2*b^2*c^4 - 64*a^3*c^5)*x^4 + 2*(b^7*c - 12*a*b^5*c^2 + 48*a^2*b^3*c^3 - 64*a^3*b*c^4)*x^3 + (b^8 -
 10*a*b^6*c + 24*a^2*b^4*c^2 + 32*a^3*b^2*c^3 - 128*a^4*c^4)*x^2 + 2*(a*b^7 - 12*a^2*b^5*c + 48*a^3*b^3*c^2 -
64*a^4*b*c^3)*x), 1/2*(2*(6*(b^2*c^3 - 4*a*c^4)*d^2 - 6*(b^3*c^2 - 4*a*b*c^3)*d*e + (b^4*c - 2*a*b^2*c^2 - 8*a
^2*c^3)*e^2)*x^3 - (b^5 - 14*a*b^3*c + 40*a^2*b*c^2)*d^2 - 2*(a*b^4 + 4*a^2*b^2*c - 32*a^3*c^2)*d*e + 6*(a^2*b
^3 - 4*a^3*b*c)*e^2 + 3*(6*(b^3*c^2 - 4*a*b*c^3)*d^2 - 6*(b^4*c - 4*a*b^2*c^2)*d*e + (b^5 - 2*a*b^3*c - 8*a^2*
b*c^2)*e^2)*x^2 - 4*(6*a^2*c^2*d^2 - 6*a^2*b*c*d*e + (6*c^4*d^2 - 6*b*c^3*d*e + (b^2*c^2 + 2*a*c^3)*e^2)*x^4 +
 2*(6*b*c^3*d^2 - 6*b^2*c^2*d*e + (b^3*c + 2*a*b*c^2)*e^2)*x^3 + (a^2*b^2 + 2*a^3*c)*e^2 + (6*(b^2*c^2 + 2*a*c
^3)*d^2 - 6*(b^3*c + 2*a*b*c^2)*d*e + (b^4 + 4*a*b^2*c + 4*a^2*c^2)*e^2)*x^2 + 2*(6*a*b*c^2*d^2 - 6*a*b^2*c*d*
e + (a*b^3 + 2*a^2*b*c)*e^2)*x)*sqrt(-b^2 + 4*a*c)*arctan(-sqrt(-b^2 + 4*a*c)*(2*c*x + b)/(b^2 - 4*a*c)) + 2*(
2*(b^4*c + a*b^2*c^2 - 20*a^2*c^3)*d^2 - 2*(b^5 + a*b^3*c - 20*a^2*b*c^2)*d*e + (5*a*b^4 - 22*a^2*b^2*c + 8*a^
3*c^2)*e^2)*x)/(a^2*b^6 - 12*a^3*b^4*c + 48*a^4*b^2*c^2 - 64*a^5*c^3 + (b^6*c^2 - 12*a*b^4*c^3 + 48*a^2*b^2*c^
4 - 64*a^3*c^5)*x^4 + 2*(b^7*c - 12*a*b^5*c^2 + 48*a^2*b^3*c^3 - 64*a^3*b*c^4)*x^3 + (b^8 - 10*a*b^6*c + 24*a^
2*b^4*c^2 + 32*a^3*b^2*c^3 - 128*a^4*c^4)*x^2 + 2*(a*b^7 - 12*a^2*b^5*c + 48*a^3*b^3*c^2 - 64*a^4*b*c^3)*x)]

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1052 vs. \(2 (192) = 384\).

Time = 1.83 (sec) , antiderivative size = 1052, normalized size of antiderivative = 5.31 \[ \int \frac {(d+e x)^2}{\left (a+b x+c x^2\right )^3} \, dx=- \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \cdot \left (2 a c e^{2} + b^{2} e^{2} - 6 b c d e + 6 c^{2} d^{2}\right ) \log {\left (x + \frac {- 64 a^{3} c^{3} \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \cdot \left (2 a c e^{2} + b^{2} e^{2} - 6 b c d e + 6 c^{2} d^{2}\right ) + 48 a^{2} b^{2} c^{2} \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \cdot \left (2 a c e^{2} + b^{2} e^{2} - 6 b c d e + 6 c^{2} d^{2}\right ) - 12 a b^{4} c \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \cdot \left (2 a c e^{2} + b^{2} e^{2} - 6 b c d e + 6 c^{2} d^{2}\right ) + 2 a b c e^{2} + b^{6} \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \cdot \left (2 a c e^{2} + b^{2} e^{2} - 6 b c d e + 6 c^{2} d^{2}\right ) + b^{3} e^{2} - 6 b^{2} c d e + 6 b c^{2} d^{2}}{4 a c^{2} e^{2} + 2 b^{2} c e^{2} - 12 b c^{2} d e + 12 c^{3} d^{2}} \right )} + \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \cdot \left (2 a c e^{2} + b^{2} e^{2} - 6 b c d e + 6 c^{2} d^{2}\right ) \log {\left (x + \frac {64 a^{3} c^{3} \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \cdot \left (2 a c e^{2} + b^{2} e^{2} - 6 b c d e + 6 c^{2} d^{2}\right ) - 48 a^{2} b^{2} c^{2} \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \cdot \left (2 a c e^{2} + b^{2} e^{2} - 6 b c d e + 6 c^{2} d^{2}\right ) + 12 a b^{4} c \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \cdot \left (2 a c e^{2} + b^{2} e^{2} - 6 b c d e + 6 c^{2} d^{2}\right ) + 2 a b c e^{2} - b^{6} \sqrt {- \frac {1}{\left (4 a c - b^{2}\right )^{5}}} \cdot \left (2 a c e^{2} + b^{2} e^{2} - 6 b c d e + 6 c^{2} d^{2}\right ) + b^{3} e^{2} - 6 b^{2} c d e + 6 b c^{2} d^{2}}{4 a c^{2} e^{2} + 2 b^{2} c e^{2} - 12 b c^{2} d e + 12 c^{3} d^{2}} \right )} + \frac {6 a^{2} b e^{2} - 16 a^{2} c d e - 2 a b^{2} d e + 10 a b c d^{2} - b^{3} d^{2} + x^{3} \cdot \left (4 a c^{2} e^{2} + 2 b^{2} c e^{2} - 12 b c^{2} d e + 12 c^{3} d^{2}\right ) + x^{2} \cdot \left (6 a b c e^{2} + 3 b^{3} e^{2} - 18 b^{2} c d e + 18 b c^{2} d^{2}\right ) + x \left (- 4 a^{2} c e^{2} + 10 a b^{2} e^{2} - 20 a b c d e + 20 a c^{2} d^{2} - 4 b^{3} d e + 4 b^{2} c d^{2}\right )}{32 a^{4} c^{2} - 16 a^{3} b^{2} c + 2 a^{2} b^{4} + x^{4} \cdot \left (32 a^{2} c^{4} - 16 a b^{2} c^{3} + 2 b^{4} c^{2}\right ) + x^{3} \cdot \left (64 a^{2} b c^{3} - 32 a b^{3} c^{2} + 4 b^{5} c\right ) + x^{2} \cdot \left (64 a^{3} c^{3} - 12 a b^{4} c + 2 b^{6}\right ) + x \left (64 a^{3} b c^{2} - 32 a^{2} b^{3} c + 4 a b^{5}\right )} \]

[In]

integrate((e*x+d)**2/(c*x**2+b*x+a)**3,x)

[Out]

-sqrt(-1/(4*a*c - b**2)**5)*(2*a*c*e**2 + b**2*e**2 - 6*b*c*d*e + 6*c**2*d**2)*log(x + (-64*a**3*c**3*sqrt(-1/
(4*a*c - b**2)**5)*(2*a*c*e**2 + b**2*e**2 - 6*b*c*d*e + 6*c**2*d**2) + 48*a**2*b**2*c**2*sqrt(-1/(4*a*c - b**
2)**5)*(2*a*c*e**2 + b**2*e**2 - 6*b*c*d*e + 6*c**2*d**2) - 12*a*b**4*c*sqrt(-1/(4*a*c - b**2)**5)*(2*a*c*e**2
 + b**2*e**2 - 6*b*c*d*e + 6*c**2*d**2) + 2*a*b*c*e**2 + b**6*sqrt(-1/(4*a*c - b**2)**5)*(2*a*c*e**2 + b**2*e*
*2 - 6*b*c*d*e + 6*c**2*d**2) + b**3*e**2 - 6*b**2*c*d*e + 6*b*c**2*d**2)/(4*a*c**2*e**2 + 2*b**2*c*e**2 - 12*
b*c**2*d*e + 12*c**3*d**2)) + sqrt(-1/(4*a*c - b**2)**5)*(2*a*c*e**2 + b**2*e**2 - 6*b*c*d*e + 6*c**2*d**2)*lo
g(x + (64*a**3*c**3*sqrt(-1/(4*a*c - b**2)**5)*(2*a*c*e**2 + b**2*e**2 - 6*b*c*d*e + 6*c**2*d**2) - 48*a**2*b*
*2*c**2*sqrt(-1/(4*a*c - b**2)**5)*(2*a*c*e**2 + b**2*e**2 - 6*b*c*d*e + 6*c**2*d**2) + 12*a*b**4*c*sqrt(-1/(4
*a*c - b**2)**5)*(2*a*c*e**2 + b**2*e**2 - 6*b*c*d*e + 6*c**2*d**2) + 2*a*b*c*e**2 - b**6*sqrt(-1/(4*a*c - b**
2)**5)*(2*a*c*e**2 + b**2*e**2 - 6*b*c*d*e + 6*c**2*d**2) + b**3*e**2 - 6*b**2*c*d*e + 6*b*c**2*d**2)/(4*a*c**
2*e**2 + 2*b**2*c*e**2 - 12*b*c**2*d*e + 12*c**3*d**2)) + (6*a**2*b*e**2 - 16*a**2*c*d*e - 2*a*b**2*d*e + 10*a
*b*c*d**2 - b**3*d**2 + x**3*(4*a*c**2*e**2 + 2*b**2*c*e**2 - 12*b*c**2*d*e + 12*c**3*d**2) + x**2*(6*a*b*c*e*
*2 + 3*b**3*e**2 - 18*b**2*c*d*e + 18*b*c**2*d**2) + x*(-4*a**2*c*e**2 + 10*a*b**2*e**2 - 20*a*b*c*d*e + 20*a*
c**2*d**2 - 4*b**3*d*e + 4*b**2*c*d**2))/(32*a**4*c**2 - 16*a**3*b**2*c + 2*a**2*b**4 + x**4*(32*a**2*c**4 - 1
6*a*b**2*c**3 + 2*b**4*c**2) + x**3*(64*a**2*b*c**3 - 32*a*b**3*c**2 + 4*b**5*c) + x**2*(64*a**3*c**3 - 12*a*b
**4*c + 2*b**6) + x*(64*a**3*b*c**2 - 32*a**2*b**3*c + 4*a*b**5))

Maxima [F(-2)]

Exception generated. \[ \int \frac {(d+e x)^2}{\left (a+b x+c x^2\right )^3} \, dx=\text {Exception raised: ValueError} \]

[In]

integrate((e*x+d)^2/(c*x^2+b*x+a)^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*a*c-b^2>0)', see `assume?` f
or more deta

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 309, normalized size of antiderivative = 1.56 \[ \int \frac {(d+e x)^2}{\left (a+b x+c x^2\right )^3} \, dx=\frac {2 \, {\left (6 \, c^{2} d^{2} - 6 \, b c d e + b^{2} e^{2} + 2 \, a c e^{2}\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{{\left (b^{4} - 8 \, a b^{2} c + 16 \, a^{2} c^{2}\right )} \sqrt {-b^{2} + 4 \, a c}} + \frac {12 \, c^{3} d^{2} x^{3} - 12 \, b c^{2} d e x^{3} + 2 \, b^{2} c e^{2} x^{3} + 4 \, a c^{2} e^{2} x^{3} + 18 \, b c^{2} d^{2} x^{2} - 18 \, b^{2} c d e x^{2} + 3 \, b^{3} e^{2} x^{2} + 6 \, a b c e^{2} x^{2} + 4 \, b^{2} c d^{2} x + 20 \, a c^{2} d^{2} x - 4 \, b^{3} d e x - 20 \, a b c d e x + 10 \, a b^{2} e^{2} x - 4 \, a^{2} c e^{2} x - b^{3} d^{2} + 10 \, a b c d^{2} - 2 \, a b^{2} d e - 16 \, a^{2} c d e + 6 \, a^{2} b e^{2}}{2 \, {\left (b^{4} - 8 \, a b^{2} c + 16 \, a^{2} c^{2}\right )} {\left (c x^{2} + b x + a\right )}^{2}} \]

[In]

integrate((e*x+d)^2/(c*x^2+b*x+a)^3,x, algorithm="giac")

[Out]

2*(6*c^2*d^2 - 6*b*c*d*e + b^2*e^2 + 2*a*c*e^2)*arctan((2*c*x + b)/sqrt(-b^2 + 4*a*c))/((b^4 - 8*a*b^2*c + 16*
a^2*c^2)*sqrt(-b^2 + 4*a*c)) + 1/2*(12*c^3*d^2*x^3 - 12*b*c^2*d*e*x^3 + 2*b^2*c*e^2*x^3 + 4*a*c^2*e^2*x^3 + 18
*b*c^2*d^2*x^2 - 18*b^2*c*d*e*x^2 + 3*b^3*e^2*x^2 + 6*a*b*c*e^2*x^2 + 4*b^2*c*d^2*x + 20*a*c^2*d^2*x - 4*b^3*d
*e*x - 20*a*b*c*d*e*x + 10*a*b^2*e^2*x - 4*a^2*c*e^2*x - b^3*d^2 + 10*a*b*c*d^2 - 2*a*b^2*d*e - 16*a^2*c*d*e +
 6*a^2*b*e^2)/((b^4 - 8*a*b^2*c + 16*a^2*c^2)*(c*x^2 + b*x + a)^2)

Mupad [B] (verification not implemented)

Time = 10.07 (sec) , antiderivative size = 517, normalized size of antiderivative = 2.61 \[ \int \frac {(d+e x)^2}{\left (a+b x+c x^2\right )^3} \, dx=\frac {\frac {x\,\left (-2\,a^2\,c\,e^2+5\,a\,b^2\,e^2-10\,a\,b\,c\,d\,e+10\,a\,c^2\,d^2-2\,b^3\,d\,e+2\,b^2\,c\,d^2\right )}{16\,a^2\,c^2-8\,a\,b^2\,c+b^4}-\frac {-6\,a^2\,b\,e^2+16\,c\,a^2\,d\,e+2\,a\,b^2\,d\,e-10\,c\,a\,b\,d^2+b^3\,d^2}{2\,\left (16\,a^2\,c^2-8\,a\,b^2\,c+b^4\right )}+\frac {3\,b\,x^2\,\left (b^2\,e^2-6\,b\,c\,d\,e+6\,c^2\,d^2+2\,a\,c\,e^2\right )}{2\,\left (16\,a^2\,c^2-8\,a\,b^2\,c+b^4\right )}+\frac {c\,x^3\,\left (b^2\,e^2-6\,b\,c\,d\,e+6\,c^2\,d^2+2\,a\,c\,e^2\right )}{16\,a^2\,c^2-8\,a\,b^2\,c+b^4}}{x^2\,\left (b^2+2\,a\,c\right )+a^2+c^2\,x^4+2\,a\,b\,x+2\,b\,c\,x^3}+\frac {2\,\mathrm {atan}\left (\frac {\left (\frac {2\,c\,x\,\left (b^2\,e^2-6\,b\,c\,d\,e+6\,c^2\,d^2+2\,a\,c\,e^2\right )}{{\left (4\,a\,c-b^2\right )}^{5/2}}+\frac {\left (16\,a^2\,b\,c^2-8\,a\,b^3\,c+b^5\right )\,\left (b^2\,e^2-6\,b\,c\,d\,e+6\,c^2\,d^2+2\,a\,c\,e^2\right )}{{\left (4\,a\,c-b^2\right )}^{5/2}\,\left (16\,a^2\,c^2-8\,a\,b^2\,c+b^4\right )}\right )\,\left (16\,a^2\,c^2-8\,a\,b^2\,c+b^4\right )}{b^2\,e^2-6\,b\,c\,d\,e+6\,c^2\,d^2+2\,a\,c\,e^2}\right )\,\left (b^2\,e^2-6\,b\,c\,d\,e+6\,c^2\,d^2+2\,a\,c\,e^2\right )}{{\left (4\,a\,c-b^2\right )}^{5/2}} \]

[In]

int((d + e*x)^2/(a + b*x + c*x^2)^3,x)

[Out]

((x*(5*a*b^2*e^2 + 10*a*c^2*d^2 - 2*a^2*c*e^2 + 2*b^2*c*d^2 - 2*b^3*d*e - 10*a*b*c*d*e))/(b^4 + 16*a^2*c^2 - 8
*a*b^2*c) - (b^3*d^2 - 6*a^2*b*e^2 - 10*a*b*c*d^2 + 2*a*b^2*d*e + 16*a^2*c*d*e)/(2*(b^4 + 16*a^2*c^2 - 8*a*b^2
*c)) + (3*b*x^2*(b^2*e^2 + 6*c^2*d^2 + 2*a*c*e^2 - 6*b*c*d*e))/(2*(b^4 + 16*a^2*c^2 - 8*a*b^2*c)) + (c*x^3*(b^
2*e^2 + 6*c^2*d^2 + 2*a*c*e^2 - 6*b*c*d*e))/(b^4 + 16*a^2*c^2 - 8*a*b^2*c))/(x^2*(2*a*c + b^2) + a^2 + c^2*x^4
 + 2*a*b*x + 2*b*c*x^3) + (2*atan((((2*c*x*(b^2*e^2 + 6*c^2*d^2 + 2*a*c*e^2 - 6*b*c*d*e))/(4*a*c - b^2)^(5/2)
+ ((b^5 + 16*a^2*b*c^2 - 8*a*b^3*c)*(b^2*e^2 + 6*c^2*d^2 + 2*a*c*e^2 - 6*b*c*d*e))/((4*a*c - b^2)^(5/2)*(b^4 +
 16*a^2*c^2 - 8*a*b^2*c)))*(b^4 + 16*a^2*c^2 - 8*a*b^2*c))/(b^2*e^2 + 6*c^2*d^2 + 2*a*c*e^2 - 6*b*c*d*e))*(b^2
*e^2 + 6*c^2*d^2 + 2*a*c*e^2 - 6*b*c*d*e))/(4*a*c - b^2)^(5/2)